Method of storing data in a multimedia file using relative timebases

ABSTRACT

The invention concerns a method for storing data in a multimedia file, the multimedia file containing an absolute time base indicator and at least a track wherein the data are stored. Said data comprise time values. The method is characterised in that it consists in associating with each track; at least a relative time base indicator which is a function of said absolute time base, and in determining some or all the time values contained in a track, with respect to a relative time base indicator associated with said track.

The present invention relates to a method of storing data in amultimedia file. It applies with particular benefit to onboard systemssuch as mobile telephones, pocket computers and any other device thathas to have multimedia capabilities and for which the size of multimediafiles and the computing power needed to process them constitute aproblem.

There are many methods of storing data in monomedia files, i.e. filesconcerning only one particular type of data. Examples that may be citedinclude the JPEG (Joint Photographic Expert Group) format for storingimages, the WAV format for storing sound data, the RTF (Rich Text File)format for storing text, etc.

There are also methods of storing data in multimedia files, i.e. filesintegrating data of different kinds. An example that may be cited is theMPEG (Motion Picture Expert Group) format integrating sound and videodata.

MIDI (Musical Instrument Digital Interface) files store sound data infiles structured into tracks, each track usually corresponding to onemusical instrument. The data contained in each track can be time values(i.e. durations of notes or times between successive notes). These timevalues are given as a function of an absolute timebase whose value isinserted into a header of the MIDI file in the form of two fields, atime signature and a tempo.

Each time value is coded in the form of the multiplicand value of theabsolute timebase. For example, if the timebase is 100 ms, a duration of1 s is coded 10.

The absolute timebase principle works well only if all the time valuesare of the same order of magnitude. This is generally the case in a MIDIfile, in which all of the data concerns sound.

However, in the context of a multimedia file incorporating data ofdifferent kinds, this absolute timebase principle is no longersatisfactory.

This is because the time values can be very heterogeneous, as a functionof the type of data. For example, time values concerning a sequence ofimages are generally a few seconds, whereas time values for musicalsequences are around 100 ms.

If the absolute timebase principle as described in the MIDI filespecifications is used, the timebase must be less then or equal to thesmallest time value in order to cater for all time values.

Consequently, the highest values are then coded on a large number ofbits.

For example, with an absolute time base of 100 ms, a time value of 10seconds is coded 100. Consequently, the time values must be coded on aminimum of seven bits per value.

In the context of an onboard system, there are severe constraints onfile size:

-   -   Firstly, the memory available is limited for reasons of overall        size and battery life.    -   Secondly, multimedia files may need to be downloaded from a        server center, and the call time is directly related to their        size.

The object of the present invention is to reduce the size of multimediafiles whilst enabling the storage of all types of data.

To this end, the invention provides a method of storing data in amultimedia file containing an absolute timebase indicator and at leastone track in which said data is stored. Said data includes time values.

The method is characterized in that each track is associated with atleast one relative timebase indicator, as a function of said absolutetimebase, and in that some or all time values contained in a track aredetermined relative to a relative timebase indicator associated withsaid track.

The invention and its advantages will become more clearly apparent inthe course of the following description, which is given with referenceto the accompanying drawings.

FIG. 1 is a diagram showing a multimedia file conforming to theinvention.

FIG. 2 is a detailed view of a track contained in a multimedia fileaccording to the invention.

FIG. 3 shows a different embodiment of the invention.

According to the invention, the data can be time values. The time valuescan represent a duration, a start value or an end value of apresentation to a user, or other data (image, sound, text, etc.). It canthus be the time of display of an image, or the time for which a musicalnote is held, or the time at which the note starts, or the wait timebetween two events, etc.

FIG. 1 is a diagram showing the structure of a multimedia file Faccording to the invention which contains a header H and a plurality oftracks T₁, T₂, . . . , T_(n).

The header H includes diverse information common to all tracks(identification, etc.) that are not detailed separately apart from anabsolute timebase (ATB) indicator.

The ATB determines the smallest time value that can be present in themultimedia file. It can be calculated as the highest common factor (HCF)of all time values in the multimedia file F.

As previously stated, the multimedia file F further includes a set oftracks T₁, T₂, . . . T_(n) (possibly a single track). Each of the trackscan be dedicated to a single type of data. For example, track T₁ caninclude a sequence of images, track T₂ can be a MIDI track, track T_(n)can include sequences of text messages, etc. These various tracks can beintended to be read and presented to the user simultaneously.

The tracks may contain time values associated with other data containedin the track. This association can take various forms:

-   -   Each data item can be systematically followed by a numerical        value. This method can be used to specify the duration of        presentation of a data item, for example (duration of a note,        etc.).    -   Time values can also be inserted optionally, as and when        required. This method can be used to specify a time-delay        between two presentations of data, for example. The omission of        this time value can then signify that the two data items must be        presented simultaneously (as in the case of a chord mode up of        several notes, for example).

These two possibilities can be combined and it is entirely possible touse other arrangements without departing from the scope of theinvention.

FIG. 2 shows the structure of a track contained in a multimedia fileconforming to the invention. In this example, the track contains onlysound data.

The track T₁ includes a header TH_(i) and data relating to sound. Afirst field Nh₁ represents the pitch of a first note and a second fieldNd₁ represents its duration. Similarly, the fields Nh₂ and Nd₂ define asecond note.

The field D₁ represents a time-delay, i.e. a wait time before presentingthe subsequent notes of the track.

The fields Nh₃ and Nd₃ respectively represent the pitch and the durationof a third note.

The fields defining a note or a time can therefore follow on in sequencein the track T_(i).

The header TH_(i) of the track T_(i) includes a relative timebaseindicator RTB_(i). The value of the relative timebase is given as afunction of the absolute timebase ATB.

In one embodiment of the invention, durations are determined as afunction of the relative timebase RTB_(i) and the times between notesonly as a function of the absolute time base ATB.

Accordingly, the time values Nd₁, Nd₂, Nd₃ are determined with respectto the relative timebase RTB_(i) while the time value D₁ is determinedwith respect to the absolute timebase ATB.

Similarly, in FIG. 1, the tracks T₁, T₂, . . . T_(n) include respectiveheaders TH₁, TH₂, . . . TH_(n). Each header contains a respectiverelative timebase indicator RTB₁, RTB₂, . . . RTB_(n).

A different embodiment could store these timebase indicators outside thetrack headers, for example in a table contained in the header H of themultimedia file.

Each track additionally contains time values v₁₁, v₁₂, v₂₁, v_(n1)determined relative to the relative timebases. A time value ispreferably determined relative to the timebase indicator contained inthe same track as itself.

The table below gives one numerical example for the time valuesrepresented in FIG. 1:

V₁₁ 100 ms V₁₂ 150 ms V₂₁ 0.5 s V_(n1) 6 s

The absolute timebase is defined as the highest common factor of alltime values. Thus here the absolute timebase indicator ATB takes thevalue 50 ms.

The relative timebases RTB₁, RTB₂ and RTB_(n) are then defined as thehighest common factors of the time values contained in their respectivetracks.

Thus there is a relative timebase equal to 50 ms for track 1,500 ms fortrack 2, and 6 s for track n.

The values of the relative timebase indicators are therefore:

RTB₁=1

RTB₂=10

RTB_(n)=120

The time values are then determined relative to these relative timebaseindications, and the following table of values is obtained:

V₁₁ 2 V₁₂ 3 V₂₁ 1 V_(n1) 1

If the time values had been coded using only an absolute timebase, itwould have been necessary to code time values from twice to 120 timesthe absolute timebase. It would therefore have been necessary to codethe time values on seven bits.

Using relative timebases, the time values range from only one to threeand therefore can be coded on only two bits.

Consequently, the method according to the invention provides a saving of5*(7 bits−2 bits)−3*7 bits=4 bits.

The first term represents the saving on the five time values present.The second term is the loss due to adding relative timebase indicatorsto the headers of the three tracks T₁, T₂ and T_(n).

If the number of time values increases, the loss due to this second termdecreases in the same proportion.

In a real situation, i.e. that of a file with a few hundred kilobytes oreven several megabytes, the saving can be as high as around 20%.

FIG. 3 shows a different embodiment in which the relative timebaseindicators can be inserted into a track T outside the header. In thiscase, a plurality of timebase indicators B₁, B₂ can easily be associatedwith the same time T.

To be more precise, each relative timebase indicator is uniquelyassociated with a portion of the track. In FIG. 3, for example, thetimebase indicator B₁ is associated with the portion P₁, the timebaseindicator B₂ with the portion P₂, and so on.

A timebase indicator preferably defines an associated portion thatfollows it immediately and which terminates at the next timebaseindicator.

In other words, the time values contained in a track are definedrelative to the timebase indicator that immediately precedes it.

An advantage of this kind of implementation is to be easily able to takeaccount of local variations of the timing of the multimedia data to bestored. Thus in the case of musical data, the tempo may change from aslow tempo (for example a largo, to use classical music terminology) toa brisk tempo (for example, an allegro) in the same track.

In this case it is beneficial to insert a relative timebase indicator atthe beginning of the change to the brisk tempo to adapt the timebase tothe time values to be coded.

1. A method of storing data in at least one track of a multimedia filecomprising: associating each track with at least one relative timebaseindicator, as a function of an absolute timebase indicator; determiningat least some of time values contained in a respective track relative toa respective relative timebase indicator associated with said track; andstoring said data in said multimedia file comprising the absolutetimebase indicator, said at least one relative timebase indicator, andsaid least one track in which said data is stored, said data comprisingsaid time values including said determined at least some of the timevalues, wherein the relative timebase indicator is an indicator of atimebase common to the at least some time values in the track, whereinthe absolute timebase indicator is an indicator of a timebase common toall time values in the multimedia file, and wherein the determiningcomprises determining duration of said at least some time values in thetrack based on the relative timebase indicator.
 2. A method according toclaim 1, wherein each relative timebase indicator is stored in the trackwith which it is associated.
 3. A method according to claim 1, whereineach of said tracks is dedicated to a single type of data.
 4. A methodaccording to claim 1, wherein each relative timebase indicator isdefined as the highest common factor of the time values contained in thetrack with which it is associated.
 5. A method according to claim 1,wherein a plurality of relative timebase indicators are associated withthe same track and each of said relative timebase indicators isassociated uniquely with a portion of said track.
 6. A method accordingto claim 1, wherein each relative timebase indicator is defined as thehighest common factor of the time values contained in the portion withwhich it is associated.
 7. A method according to claim 5, wherein eachtime value is defined relative to the relative timebase indicator thatprecedes it in the track containing it.
 8. The method according to claim1, wherein said determining comprises determining all of said timevalues contained in said track relative to the relative timebaseindicator associated with said track, and wherein said time valuescomprise at least two out of a group of a duration, time betweensuccessive events, start time, and end time of a presentation to a user.9. A method of storing data in at least one track of a multimedia filecomprising: generating one relative timebase indicator for each track,wherein the relative timebase indicator is a function of an absolutetimebase indicator, storing, in each track, a respective generatedrelative timebase indicator; determining at least some of time valuescontained in a respective track relative to the relative timebaseindicator associated with said track; and storing said data in saidmultimedia file comprising said absolute timebase indicator and saidleast one track in which said data is stored, said data comprises saiddetermined time values, wherein the relative timebase indicator is anindicator of a timebase common to the at least some time values in thetrack, wherein the absolute timebase indicator is an indicator of atimebase common to all time values in the multimedia file, and whereinthe determining comprises determining duration of said at least sometime values in the track based on the relative timebase indicator. 10.The method according to claim 9, wherein the time data comprises aduration, a time value between events, a start value, and an end valueof a presentation to a user.
 11. The method according to claim 9,wherein the time data comprises a duration and a time value betweenevents, and wherein the duration is determined as a function of therelative timebase indicator and the time between events is determined asa function of the absolute database indicator.
 12. The method accordingto claim 9, wherein said multimedia file comprises a header and aplurality of tracks, wherein the header of said multimedia filecomprises information common to all tracks including the absolutetimebase indicator, and wherein each track comprises a header in which arespective relative timebase indicator is stored.
 13. The methodaccording to claim 12, wherein the absolute timebase indicatordetermines smallest time value possible in said multimedia file.
 14. Themethod according to claim 12, wherein the absolute timebase indicator isa highest common factor of all values of said time data and the relativetimebase indicator is a highest common factor of all values of said timedata within a respective track, and wherein all of the time valuesstored in said track are determined relative to the relative timebaseindicator associated with said track.
 15. The method according to claim1, wherein the relative timebase indicator is an indicator of a timebasecommon to the at least some time values in the track, wherein theabsolute timebase indicator is an indicator of a timebase common to alltime values in the multimedia file, and wherein the determiningcomprises determining duration of said at least some time values in thetrack based on the relative timebase indicator.